package game;

public class Poker
{
	// 花色
	// 牌面
	
	// 							花色		牌面
	// 黑桃A - K    1~13			0		A-K
	// 红桃A - K 	   14-26		1
	// 草花			27-39		2
	// 方片			40-52		3
	// 大鬼 小鬼  53  4			4		
	
	int n;

	public int getN()
	{
		return n;
	}

	public void setN(int n)
	{
		this.n = n;
	}
	
	// 
	public int getType()
	{
		int type = (this.n-1)/13;
		return type;
//		String[] typeStr = {"♠","♥","♣","♦"};
//		return typeStr[type];
	}
	
	public int getNum()
	{
		int num = (this.n-1) % 13;
		return num;
//		String[] numStr = {"A","2","3","4","5","6","7","8","9","10","J","Q","K"};
//		return numStr[num];
	}

	public Poker(int n)
	{
		super();
		this.n = n;
	}

	public Poker()
	{
		super();
		// TODO Auto-generated constructor stub
	}

	@Override
	public String toString()
	{
		// 
		String[] typeStr = {"♠","♥","♣","♦"};
		String[] numStr = {"A","2","3","4","5","6","7","8","9","10","J","Q","K"};
		return typeStr[getType()]+numStr[getNum()];
	}
	
	
}
